﻿using System;
using System.Text;

/*Bewegung muß noch implementiert werden*/
namespace mfcsg
{
    class Program
    {
        static void Main()
        {
            ConsoleKeyInfo taste = new ConsoleKeyInfo();
            ConsoleKeyInfo reset = new ConsoleKeyInfo();
            int[] ispos = { 1, 1 };
            int[] newpos = { 0, 0 };

            string[,] lvl1 = {{"#","#","#","#","#","#","#","#","#","#","#","#","#","#","#","#","#","#","#","#"},
                              {"#"," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," ","#"},
                              {"#"," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," ","#"},
                              {"#"," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," ","#"},
                              {"#"," "," "," ","*"," "," "," "," "," "," "," "," "," "," "," "," "," "," ","#"},
                              {"#"," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," ","#"},
                              {"#"," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," ","#"},
                              {"#"," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," ","#"},
                              {"#"," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," ","#"},
                              {"#"," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," ","#"},
                              {"#"," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," ","#"},
                              {"#"," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," ","#"},
                              {"#"," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," ","#"},
                              {"#"," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," ","#"},
                              {"#"," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," ","#"},
                              {"#"," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," ","#"},
                              {"#"," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," ","#"},
                              {"#"," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," ","#"},
                              {"#"," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," ","O"," ","#"},
                              {"#","#","#","#","#","#","#","#","#","#","#","#","#","#","#","#","#","#","#","#"}};
            Console.Clear();
            do
            {
                for (int i = 0; i < 20; i++)
                {
                    for (int j = 0; j < 20; j++)
                    {
                        Console.Write(lvl1[i, j].ToString());
                    }
                    Console.WriteLine();
                }
                Console.Write("Bitte drücken Sie eine Taste: ");
                taste = Console.ReadKey();
                Console.WriteLine();
                switch (taste.Key)
                {
                    case ConsoleKey.RightArrow:
                        Console.WriteLine("Pfeil rechts");
                        Console.ReadKey();
                        break;
                    case ConsoleKey.LeftArrow:
                        Console.WriteLine("Pfeil links");
                        Console.ReadKey();
                        break;
                    case ConsoleKey.UpArrow:
                        Console.WriteLine("Pfeil hoch");
                        Console.ReadKey();
                        break;
                    case ConsoleKey.DownArrow:
                        Console.WriteLine("Pfeil unten");
                        Console.ReadKey();
                        break;
                    case ConsoleKey.Q:
                        Console.WriteLine("Programm wird beendet");
                        Console.ReadKey();
                        break;
                    case ConsoleKey.R:
                        Console.Write("Möchten Sie das Spiel wirklich resetten? j/n : ");
                        reset = Console.ReadKey();
                        if (reset.Key == ConsoleKey.J) Main();
                        Console.ReadKey();
                        break;
                    default:
                        Console.WriteLine("Bitte Steuern Sie mit den Pfeiltasten.\nUm das Spiel zu resetten drücken Sie R.\nZum Beenden Q drücken.");
                        Console.ReadKey();
                        break;
                }
                Console.Clear();
            } while (!(taste.Key == ConsoleKey.Q));
            //Console.ReadKey();
        }
    }
}